package com.jspgou.cms.manager;

import java.util.Date;
import java.util.List;

import com.jspgou.common.page.Pagination;
import com.jspgou.cms.entity.Consult;

public interface ConsultMng {
	public Consult findById(Long id);
    //加入字段，标记咨询类型
	public Consult saveOrUpdate(Long productId,Long storeId,String content,String consultType,Long memberId);

	public Consult update(Consult Consult);

	public Consult deleteById(Long id);
	
	//添加方法，当字典中删除某个记录时，根据consultType删除consult中相应的记录。
	public List<Consult> deleteByType(String consultType);
	//添加方法，根据consultType获取consult,	为了实现字典中更改数据时，consult表能够将更改前相应value值的consult同时更改
	public List<Consult> findByType(Long productId,String consultType);
	
	public Pagination getPage(Long productId,Long memberId,Long storeId,String consultType,String userName,String productName,
			Date startTime,Date endTime,int pageNo,int pageSize,Boolean cache);
	
	public Consult[] deleteByIds(Long[] ids);
	
	public Pagination getPage(Long memberId,Long storeId,int pageNo,int pageSize,boolean cache);
}